package com.zero.clinic.service.impl;

import com.zero.clinic.mapper.PermissionMapper;
import com.zero.clinic.pojo.Permission;
import com.zero.clinic.pojo.PermissionExample;
import com.zero.clinic.service.PermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PermissionServiceImpl implements PermissionService {

    @Resource
    private PermissionMapper permissionMapper;

    @Override
    public List<Permission> selectByExample(PermissionExample example) {
        return permissionMapper.selectByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Long permissionId) {
        return permissionMapper.deleteByPrimaryKey(permissionId);
    }

    @Override
    public int insert(Permission record) {
        return permissionMapper.insert(record);
    }

    @Override
    public int insertSelective(Permission record) {
        return permissionMapper.insertSelective(record);
    }

    @Override
    public Permission selectByPrimaryKey(Long permissionId) {
        return permissionMapper.selectByPrimaryKey(permissionId);
    }

    @Override
    public int updateByPrimaryKeySelective(Permission record) {
        return permissionMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int deleteByIds(String[] permissionIds) {
        return permissionMapper.deleteByIds(permissionIds);
    }

    @Override
    public List<String> selectExpressionsByPermissionIds(String[] jobPermissionsArr) {
        return permissionMapper.selectExpressionsByPermissionIds(jobPermissionsArr);
    }
}
